package com.xiaoyu.izf.service;

import com.xiaoyu.izf.model.AppPicInfo;
import com.xiaoyu.izf.model.VipInfo;
import com.xiaoyu.izf.repository.AppPicInfoDao;
import com.xiaoyu.izf.repository.VipInfoDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AppHomePageService {
    @Autowired
    private VipInfoDao vipInfoDao;
    @Autowired
    private AppPicInfoDao appPicInfoDao;

    public List<VipInfo> vipInfos(){
        return vipInfoDao.findAllToApp();
    }

    public List<AppPicInfo> banners(){
        return appPicInfoDao.findAllByType("banner");
    }

}
